.TH E1432_SET_ARM_MODE 3 E1432
.SH NAME
.nf
e1432_set_arm_mode \- Set auto arm state
e1432_get_arm_mode \- Get current auto arm state
e1432_set_auto_arm \- Obsolete name for e1432_set_arm_mode
e1432_get_auto_arm \- Obsolete name for e1432_get_arm_mode
.fi
.IX e1432_set_arm_mode(3) 3
.IX e1432_get_arm_mode(3) 3
.IX e1432_set_auto_arm(3) 3
.IX e1432_get_auto_arm(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_arm_mode(E1432ID hw, SHORTSIZ16 ID,
                              SHORTSIZ16 armState)
SHORTSIZ16 e1432_get_arm_mode(E1432ID hw, SHORTSIZ16 ID,
                              SHORTSIZ16 *armState)
SHORTSIZ16 e1432_set_auto_arm(E1432ID hw, SHORTSIZ16 ID,
                              SHORTSIZ16 armState)
SHORTSIZ16 e1432_get_auto_arm(E1432ID hw, SHORTSIZ16 ID,
                              SHORTSIZ16 *armState)
.cE
.SH DESCRIPTION
\fIe1432_set_arm_mode\fR sets the arm mode, of a single channel or
group of channels \fIID\fR, to the value given in \fIarmState\fR.

\fIe1432_get_arm_mode\fR returns the current value of the arm mode, of
a single channel or group of channels \fIID\fR, into a memory location
pointed to by \fIarmState\fR.

\fIe1432_set_auto_arm\fR and \fIe1432_get_auto_arm\fR are identical to
\fIe1432_set_arm_mode\fR and \fIe1432_get_arm_mode\fR respectively.
These functions are provided for compatibility with the E1431 Host
Interface library, and should not be used by new code.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIarmState\fR determines which arm event will allow the module to
advance from the IDLE state into the ARM state.

\fBE1432_MANUAL_ARM\fR sets the module to wait for a arm event to
occur either from the system (SYNC line), or from the
\fIe1432_arm_measure\fR command, in order to perform the transition.

\fBE1432_AUTO_ARM\fR sets the module to perform the transition as soon
as it enters the IDLE state.  When in the order tracking mode, the 
measurement does not re-arm until the results of the previous arm/trigger
have been uploaded by the host.   This is done to prevent accumulation of
so many trigger points the the internal data FIFO starts to overwrite the
older trigger points.  The data in order tracking mode is usually not
continuous for this reason.  If continuous resampled data is wanted, use
the \fBE1432_AUTO_ARM_CONTINUOUS\fR in order tracking.

\fBE1432_AUTO_ARM_CONTINUOUS\fR is used only in the order tracking mode to
continuously resample data.   This mode currently only works with the
\fBE1432_TACH_EDGE_TRIGGER\fR auto trigger mode, which will produce continuously
resampled data.  If the host does not upload data fast enough to remain in
real time, the internal data FIFO will stop automatically before it 
overwrites the oldest trigger points.  The FIFO will then empty and the 
\fBE1432_IRQ_MEAS_ERROR\fR and \fBE1432_STATUS2_TACH_OVERFLOW\fR bits set 
in the status register when the FIFO is completely empty.

There are three RPM arming modes.

\fBE1432_ARM_RPM_RUNUP\fR sets the module to do an initial arm as soon
as the RPM from the tachometer board rises above the level set by the
\fIe1432_set_rpm_low\fR function.  After the initial arm, each
successive arm occurs after the RPM increases by the amount set by the
\fIe1432_set_rpm_interval\fR function.

\fBE1432_ARM_RPM_RUNDOWN\fR sets the module to do an initial arm as
soon as the RPM from the tach board falls below the value set by the
\fIe1432_set_rpm_high\fR function.  After the initial arm, each
successive arm occurs after the RPM decreases by the amount set by the
\fIe1432_set_rpm_interval\fR function.

\fBE1432_ARM_RPM_DELTA\fR sets the module to do an initial arm as soon
as the RPM falls within the values set by the \fIe1432_set_rpm_low\fR
and \fIe1432_set_rpm_high\fR functions.  After the initial arm, each
successive arm occurs after the RPM changes by the amount set by the
\fIe1432_set_rpm_interval\fR function.

\fBE1432_ARM_TIME\fR arms the module at regular time intervals set by
\fIe1432_set_arm_time_interval\fR.  The length of the measurement is set
by \fIe1432_set_meas_time_length\fR.

.SH "RESET VALUE"
After a reset, \fIarmState\fR is set to \fBE1432_AUTO_ARM\fR.  Note
that this is different than the E1431, which defaults to
\fBE1432_MANUAL_ARM\fR.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_arm_measure, e1432_set_rpm_low, e1432_set_rpm_high, 
e1432_set_rpm_interval, e1432_set_interrupt, e1432_get_meas_warning
.ad
